package cc.cix.hq.common.core.entity.org;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author cix
 */
@Data
@ApiModel(value = "Log对象", description = "系统日志")
@TableName("t_log")
public class Log implements Serializable {

    private static long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("日志 ID")
    private Long id;

    @ApiModelProperty("操作用户")
    private String username;

    @TableField(condition = SqlCondition.LIKE)
    @ApiModelProperty("操作用户")
    private String operation;

    @ApiModelProperty("耗时（毫秒）")
    private Long time;

    @ApiModelProperty("操作方法")
    private String method;

    @ApiModelProperty("方法参数")
    private String params;

    @ApiModelProperty("操作者IP")
    private String ip;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(condition = SqlCondition.LIKE)
    @ApiModelProperty("操作地点")
    private String location;

}
